#ifndef CONIN_RTL_RUNTIME_ENVIRONMENT_IMPLEMENTATION_H
#define CONIN_RTL_RUNTIME_ENVIRONMENT_IMPLEMENTATION_H

// provided interface
#include "enventities.h"

namespace cnc {

	namespace rtl {

		class RuntimeEnvironment :
			public virtual EnvironmentEntities
		{
			int argc_;
			char **argv_;
		protected:
			RuntimeEnvironment() :
				argc_(0), argv_(0) {}
		public:
			EnvironmentEntities *getEnvironmentEntities()
			{
				return static_cast<EnvironmentEntities *>(this);
			}
		protected: // Environment Entities
			virtual void setupEnvironment(int argc, char *argv[])
			{
				argc_ = argc;
				argv_ = argv;
			}
			virtual int getArgc()
			{
				return argc_;
			}
			virtual char **getArgv()
			{
				return argv_;
			}
		public:
			static RuntimeEnvironment &instance()
			{
				static RuntimeEnvironment object;
				return object;
			}
		};

	} // namespace rtl

} // namespace cnc

#endif

